import { createBrowserRouter } from 'react-router-dom'

const Home=(()=>import('../Page/Home'))
const City=(()=>import('../Page/City'))
const Login=(()=>import('../Page/Login'))
const Chat=(()=>import('../Page/Chat'))
const List=(()=>import('../Page/List'))

export const routes= createBrowserRouter([
    {
        path:'/',
        lazy:async()=>{
            const {default:Home}=await import('../Page/Home')
            return {element:<Home/>}
        }
    },
    {
        path:'/chat',
        lazy:async()=>{
            const {default:Chat}=await import('../Page/Chat')
            return {element:<Chat/>}
        }
    }
])